package com.mall.project.sys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mall.project.sys.mapper.QuartzJobLogMapper;
import com.mall.project.sys.model.entity.QuartzJobLog;
import com.mall.project.sys.model.parm.QuartzJobLogPARM;
import com.mall.project.sys.service.IQuartzJobLogService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 定时任务调度日志表 服务实现类
 * </p>
 *
 * @author Sam
 * @since 2021-02-08
 */
@Service
public class QuartzJobLogServiceImpl extends ServiceImpl<QuartzJobLogMapper, QuartzJobLog> implements IQuartzJobLogService {

    @Override
    public void addJobLog(QuartzJobLogPARM quartzJobLogPARM) {
        QuartzJobLog jobLog = quartzJobLogPARM.convert(QuartzJobLog.class);
        this.save(jobLog);
    }

    @Override
    public void cleanJobLog() {
        baseMapper.cleanJobLog();
    }
}
